Developer Documentation
PATH  Mac OS X Documentation > Developer Tools > Mac OS X Assembler Guide


Previous | Contents | Next

Operand Field

The operand field of an assembly language statement supplies the arguments to the machine instruction, assembler directive, or macro.

The operand field may contain one or more operands, depending on the requirements of the preceding machine instruction or assembler directive. Some machine instructions and assembler directives don't take any operand, and some take two or more. If the operand field contains more than one operand, the operands are generally separated by commas, as shown here:

[ operand [ , operand ] ... ]

The following types of objects can be operands:

Register operands in a machine instruction refer to the machine registers of the processor or coprocessor. Register names may appear in mixed case.

Architecture- and Processor-Specific Caveats

Intel 386 Architecture

CMPXCHG r/m32 ,r32 # Intel processor manual convention

The Mac OS X assembler syntax for this same instruction is:

cmpxchg r32 ,r/m32 # Mac OS X assembler syntax

So an example of actual assembly code for Mac OS X would be:

cmpxchg %ebx,(%eax) # Mac OS X assembly code

Mac OS X Assembler Guide: ASM Layout

Previous | Contents | Next